#ifndef __USART_CONFIG_H
#define __USART_CONFIG_H


#define USART0_ENABLE      1
#define USART1_ENABLE      1
#define USART2_ENABLE      0
#define USART3_ENABLE      0
#define USART4_ENABLE      0
#define USART5_ENABLE      0
#define USART6_ENABLE      0


// ************************************* USART0 *****************************************
#if USART0_ENABLE
#define USART0_RECV_ENABLE      1
#define USART0_TX_DMA_ENABLE    0
#define USART0_RX_DMA_ENABLE    0

#define USART0_TX_RCU			RCU_GPIOA
#define USART0_TX_PORT			GPIOA
#define USART0_TX_PIN			GPIO_PIN_9
#define USART0_TX_AF			GPIO_AF_7
	
#define USART0_RX_RCU			RCU_GPIOA
#define USART0_RX_PORT			GPIOA
#define USART0_RX_PIN			GPIO_PIN_10
#define USART0_RX_AF			GPIO_AF_7

#define RX0_BUFFER_LEN          1024
#define USART0_BAUDRATE         115200u
#define USART0_IRQ_PRIORIY      6, 0
#endif

// ************************************* USART1 *****************************************
#if USART1_ENABLE
#define USART1_RECV_ENABLE      1
#define USART1_TX_DMA_ENABLE    0
#define USART1_RX_DMA_ENABLE    0

#define USART1_TX_RCU			RCU_GPIOD
#define USART1_TX_PORT			GPIOD
#define USART1_TX_PIN			GPIO_PIN_6
#define USART1_TX_AF			GPIO_AF_7
	
#define USART1_RX_RCU			RCU_GPIOD
#define USART1_RX_PORT			GPIOD
#define USART1_RX_PIN			GPIO_PIN_5
#define USART1_RX_AF			GPIO_AF_7

#define RX1_BUFFER_LEN          1024
#define USART1_BAUDRATE         115200u
#define USART1_IRQ_PRIORIY      6, 0
#endif

// ************************************* USART2 *****************************************
#if USART2_ENABLE
#define USART2_RECV_ENABLE      1
#define USART2_TX_DMA_ENABLE    1
#define USART2_RX_DMA_ENABLE    1


#define USART2_TX_RCU			RCU_GPIOA
#define USART2_TX_PORT			GPIOA
#define USART2_TX_PIN			GPIO_PIN_9
#define USART2_TX_AF			GPIO_AF_7
	
#define USART2_RX_RCU			RCU_GPIOA
#define USART2_RX_PORT			GPIOA
#define USART2_RX_PIN			GPIO_PIN_10
#define USART2_RX_AF			GPIO_AF_7

#define RX2_BUFFER_LEN          1024
#define USART2_BAUDRATE         115200u
#define USART2_IRQ_PRIORIY      6, 0
#endif

#endif